import { Module, ValidationPipe } from '@nestjs/common';
import { APP_PIPE } from '@nestjs/core';
import { TypeOrmModule } from '@nestjs/typeorm';
import { CommentModule } from 'lib/comment';
import { VillageAction } from 'libs/db/entity/village-action.entity';
import { VillageActionController } from './village-action.controller';
import { VillageActionService } from './village-action.service';

@Module({
    imports: [
        CommentModule,
        TypeOrmModule.forFeature([VillageAction])
    ],
    controllers: [
        VillageActionController
    ],
    providers: [
        VillageActionService,
        {
            provide: APP_PIPE,
            useClass: ValidationPipe
        }
    ],
})
export class VillageActionModule { }
